package rj.servlet.sy2;
import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class ShowLetter extends GenericServlet {
    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        // 设置响应内容类型
        res.setContentType("text/html;charset=UTF-8");

        // 获取 PrintWriter 对象以发送响应
        PrintWriter out = res.getWriter();
        out.println("<html><body>");
        out.print("<BR>英文大写字母:");
        for (char c='A';c<='Z';c++) {
            out.print(c);
        }
        out.print("<BR>英文小写字母:");
        for (char c='a';c<='z';c++) {
            out.print(c);
        }
        out.println("</html></body>");
    }
}